﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using prufa.Models;

namespace prufa.Controllers
{
    //Make a UserController that inherits from the Controller.ASG&SAS
    public class UserController : Controller
    {
        //make new instance of UserContext .ASG
        UsersContext db = new UsersContext();
        //
        // GET: /User/

        //the action transfers the user-list immediately to the view. ASG
        public ActionResult UserList()
        {
            //make user variable that contains the userProfiles and makes a list. ASG
            var user = db.UserProfiles.ToList();
            return View(user);
        }

        //the action transfers the user immediately to the view. ASG
        public ActionResult UserId(int id)
        {
            //make user variable that contains the userProfiles after id. ASG
            var user = db.UserProfiles.Find(id);
            return View(user);
        }

    }
}
